package com.ruoyi.informfrontend.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.informfrontend.mapper.SysUserNeedMapper;
import com.ruoyi.informfrontend.domain.SysUserNeed;
import com.ruoyi.informfrontend.service.ISysUserNeedService;

/**
 * 需求方Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-19
 */
@Service
public class SysUserNeedServiceImpl implements ISysUserNeedService 
{
    @Autowired
    private SysUserNeedMapper sysUserNeedMapper;

    /**
     * 查询需求方
     * 
     * @param userId 需求方主键
     * @return 需求方
     */
    @Override
    public SysUserNeed selectSysUserNeedByUserId(Long userId)
    {
        return sysUserNeedMapper.selectSysUserNeedByUserId(userId);
    }

    /**
     * 查询需求方列表
     * 
     * @param sysUserNeed 需求方
     * @return 需求方
     */
    @Override
    public List<SysUserNeed> selectSysUserNeedList(SysUserNeed sysUserNeed)
    {
        return sysUserNeedMapper.selectSysUserNeedList(sysUserNeed);
    }

    /**
     * 新增需求方
     * 
     * @param sysUserNeed 需求方
     * @return 结果
     */
    @Override
    public int insertSysUserNeed(SysUserNeed sysUserNeed)
    {
        return sysUserNeedMapper.insertSysUserNeed(sysUserNeed);
    }

    /**
     * 修改需求方
     * 
     * @param sysUserNeed 需求方
     * @return 结果
     */
    @Override
    public int updateSysUserNeed(SysUserNeed sysUserNeed)
    {
        return sysUserNeedMapper.updateSysUserNeed(sysUserNeed);
    }

    /**
     * 批量删除需求方
     * 
     * @param userIds 需要删除的需求方主键
     * @return 结果
     */
    @Override
    public int deleteSysUserNeedByUserIds(Long[] userIds)
    {
        return sysUserNeedMapper.deleteSysUserNeedByUserIds(userIds);
    }

    /**
     * 删除需求方信息
     * 
     * @param userId 需求方主键
     * @return 结果
     */
    @Override
    public int deleteSysUserNeedByUserId(Long userId)
    {
        return sysUserNeedMapper.deleteSysUserNeedByUserId(userId);
    }
}
